import Vue from 'vue';
import VueRouter from 'vue-router';
// tabbar
import Home from "./components/tabbar/Home.vue"
import User from "./components/tabbar/User.vue"
import Shopcar from "./components/tabbar/Shopcar.vue"
import Search from "./components/tabbar/Search.vue"
// news
import newList from "./components/news/newList.vue"
import newInfo from "./components/news/newinfo.vue"
// photo
import photoList from "./components/photo/photolist.vue"
import photoInfo from "./components/photo/photoinfo.vue"
// goods
import goodsList from "./components/goods/goodslist.vue"
import goodsInfo from "./components/goods/goodsinfo.vue"


Vue.use(VueRouter);

var router = new VueRouter({
  routes: [{
    path: "/",
    redirect: "/home"
  }, {
    path: "/home",
    component: Home,
  }, {
    path: "/user",
    component: User
  }, {
    path: "/shopcar",
    component: Shopcar
  }, {
    path: "/search",
    component: Search
  }, {
    path: '/news/list',
    component: newList
  }, {
    path: '/news/info/:id',
    component: newInfo
  }, {
    path: '/photo/list',
    component: photoList
  }, {
    path: '/photo/info/:id',
    component: photoInfo
  }, {
    path: '/goods/list',
    component: goodsList
  }, {
    path: '/goods/info/:id',
    component: goodsInfo
  }],
  linkActiveClass: 'mui-active'
})

export default router;